import request from '@/utils/request'

// 查询预约列表
export function listBooking (query) {
  return request({
    url: '/orderManage/booking/list',
    method: 'get',
    params: query
  })
}

// 查询预约详细
export function getBooking (id) {
  return request({
    url: '/orderManage/booking/' + id,
    method: 'get'
  })
}

// 结束预约单
export function completeBooking (id) {
  return request({
    url: '/orderManage/booking/complete/' + id,
    method: 'get'
  })
}

// 新增预约
export function addBooking (data) {
  return request({
    url: '/orderManage/booking',
    method: 'post',
    data: data
  })
}

// 修改预约
export function updateBooking (data) {
  return request({
    url: '/orderManage/booking',
    method: 'put',
    data: data
  })
}

// 删除预约
export function delBooking (id) {
  return request({
    url: '/orderManage/booking/' + id,
    method: 'delete'
  })
}
